//
//  KYSystemInfoTool.m
//  KYKJPackDemo
//
//  Created by Jordan zhou on 2017/10/9.
//  Copyright © 2017年 ???. All rights reserved.
//

#define kResource @"system_info.plist"

#import "KYSystemInfoTool.h"
@implementation KYSystemInfoTool

+ (NSString *)bundleID
{
    NSString *path = [[NSBundle mainBundle] pathForResource:kResource ofType:nil];
    NSDictionary *data = [NSDictionary dictionaryWithContentsOfFile:path];
    return [data valueForKey:@"bundleID"];
}

+ (NSString *)appKey
{
    NSString *path = [[NSBundle mainBundle] pathForResource:kResource ofType:nil];
    NSDictionary *data = [NSDictionary dictionaryWithContentsOfFile:path];
    return [data valueForKey:@"appKey"];
}

+ (NSString *)appName
{
    NSString *path = [[NSBundle mainBundle] pathForResource:kResource ofType:nil];
    NSDictionary *data = [NSDictionary dictionaryWithContentsOfFile:path];
    return [data valueForKey:@"appName"];
}



/**
 *  创建单例
 */
+ (instancetype)shareInfoTool
{
    static KYSystemInfoTool *infoTool;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        if (infoTool == nil) {
            infoTool = [[KYSystemInfoTool alloc] init];
        }
    });
    return infoTool;
}
@end
